package com.pfzy.utildemo.activity.record.util;

import com.pfzy.utildemo.activity.record.soundrecord.constatns.SoundRecordConstant;

public class FileDirNameUtil {
    private static final String sDirName = "sound_recorder";

    public static String getFileSuffix(boolean useAAC) {
        return useAAC ? ".aac" : ".mp3";
    }

    /**
     * 获取部分记录文件名
     */
    public static String getPartRecordFileName(String orderNo) {
        return orderNo + SoundRecordConstant.UNDER_LINE + System.currentTimeMillis();
    }

    /**
     * 获取记录文件名
     */
    public static String getRecordFileName(String groupId, int count, boolean useAAC) {
        return groupId + SoundRecordConstant.UNDER_LINE + count + SoundRecordConstant.UNDER_LINE + System.currentTimeMillis() + getFileSuffix(useAAC);
    }

    /**
     * 获取记录文件目录
     */
    public static String getRecordFileDir() {
        return sDirName;
    }
}
